<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="format-detection" content="telephone=no"/>
    <title>发布动态</title>
    <link rel="stylesheet" href="css/reset_b43207c.css"/>
    <link rel="stylesheet" href="css/publish.css"/>
    <link rel="stylesheet" href="css/rem_a30ca1a.css"/>
</head>
<body>
    <div class="wrap">
        <textarea id="saytext" class="textarea" type="textarea" placeholder="一起发表评论吧~"></textarea>
        <div class="photo-container wrapfix">
            <div id="preview"></div>
            <div class="input-file">
                <input type="file" onchange="previewImage(this,'preview','imghead1')" />
            </div>
        </div>
        <div class="send wrapfix">
            <p>发送</p>
        </div>
        <div class="comment-option">
            <div class="face-btn"></div>
        </div>
    </div>
    <!-- <script type="text/javascript" src="js/zepto.min.js"></script> -->
    <script type="text/javascript" src="js/jquery-1.7.2_af693f9.js"></script>
    <script type="text/javascript" src="js/jquery.qqFace_ab35582.js"></script>
    <script type="text/javascript" src="js/publish_a627929.js"></script>
    <script type="text/javascript">
        //图片上传预览
        function previewImage(file,divId,imgId)
        {
          var MAXWIDTH  = 260; 
          var MAXHEIGHT = 180;
          var div = document.getElementById(divId);
          if (file.files && file.files[0])
          {
              div.innerHTML ='<img id='+ imgId +'>';
              var img = document.getElementById(imgId);
              /*img.onload = function(){
                var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
                img.width  =  rect.width;
                img.height =  rect.height;
//                 img.style.marginLeft = rect.left+'px';
                img.style.marginTop = rect.top+'px';
              }*/
              var reader = new FileReader();
              reader.onload = function(evt){img.src = evt.target.result;}
              reader.readAsDataURL(file.files[0]);
          }
        }
    </script>
</body>
</html>